import request from '@/utils/request'

export function getList(data = {}) {
  return request({
    url: '/rolelist',
    method: 'post',
    data: {
      page: 1,
      list_row: 1000,
      ...data,
    },
  })
}

export function doAdd(data) {
  return request({
    url: '/roleadd',
    method: 'post',
    data,
  })
}

export function setRole(data) {
  return request({
    url: '/roledistribute',
    method: 'post',
    data,
  })
}

export function getDetail(data) {
  return request({
    url: '/roledetail',
    method: 'post',
    data,
  })
}

export function doEdit(data) {
  return request({
    url: '/roleedit',
    method: 'post',
    data,
  })
}

export function doDelete(data) {
  return request({
    url: '/roledelete',
    method: 'post',
    data,
  })
}

export function getRoleList(data) {
  return request({
    url: '/authlist1',
    method: 'post',
    data,
  })
}
/**
* @description:  修改密码
* @param {}
*/
export function editpaypass(data) {
  return request({
    url: '/editpaypass',
    method: 'post',
    data,
  })
}
